<template>
  <div>
    <div v-if="this.$route.path == '/layout'" class="back" @click="back">
      <a-icon type="caret-left"/>返回
    </div>
    <router-view />
  </div>
</template>

<script>
export default {
  methods: {
    back() {
      this.$router.go(-1)
    }
  }
}
</script>

<style lang="less" scoped>
.back{
  font-size: 16px;
  color: #c2cadc;
  margin-bottom: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  background: #262c33;
  border: 1px solid #2f353b;
  box-sizing: border-box;
  padding: 4px 10px 4px 5px;

  i{
    margin-right: 3px;
  }

  &:hover{
    color: #fff;
  }
}
</style>